package service.template.admin;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;

import javax.servlet.jsp.JspWriter;

import bdd.BddNews;
import bean.produit.Categorie;
import bean.produit.Service;

public class AffichageEditionNews {

	
	public static void afficheServices(JspWriter out, ArrayList<Service> listeService) throws IOException{
			
		for (Service s : listeService){
        	out.println("<option value="+s.getIdService()+">"+s.getNomService()+"</option>");
		}
        	
	}
	
	public static void afficheTexteService(JspWriter out, int id_service) throws IOException{
		
		try{
			out.print(BddNews.selectNews(id_service).getTexte());
		} 
		catch (Exception e){
			e.printStackTrace();
		}
	}
	
}